/* 页面基础样式 */
page {
  height: 100vh;
}

.page-container {
  height: 100vh;
  background-color: #F8FAFF;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* 顶部导航样式 */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20rpx 40rpx;
  background: linear-gradient(135deg, #4A90E2, #357ABD);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.2);
  flex-shrink: 0;
  border-bottom-left-radius: 30rpx;
  border-bottom-right-radius: 30rpx;
}

.title {
  font-size: 20px;
  font-weight: 600;
  color: #FFFFFF;
  letter-spacing: 1px;
}

/* 聊天区域样式 */
.chat-container {
  flex: 1;
  padding: 20rpx;
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* 增加 iOS 滚动流畅度 */
}

.chat-list {
  display: flex;
  flex-direction: column;
  gap: 30rpx;
  min-height: 100%;
  padding-bottom: 120rpx; /* 增加底部padding，确保最后一条消息不被遮挡 */
}

.message {
  display: flex;
  align-items: flex-start;
  gap: 20rpx;
  max-width: 80%;
}

.message.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.avatar {
  width: 80rpx;
  height: 80rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F0F2F5;
  border-radius: 40rpx;
}

.content {
  padding: 20rpx;
  border-radius: 16rpx;
  font-size: 32rpx;
  line-height: 1.5;
  background-color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message.user .content {
  background-color: #4A90E2;
  color: #FFFFFF;
}

.time {
  font-size: 24rpx;
  color: #999999;
  margin-top: 10rpx;
}

/* 底部区域样式 */
.bottom-area {
  background-color: #FFFFFF;
  border-top-left-radius: 30rpx;
  border-top-right-radius: 30rpx;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.04);
}

/* 快捷选项样式 */
.quick-options-wrapper {
  height: 120rpx;
  transition: all 0.3s ease;
  overflow: hidden;
}

.quick-options-hidden {
  height: 0;
}

.quick-options {
  padding: 30rpx;
  background-color: transparent;
}

.option-list {
  display: flex;
  gap: 24rpx;
  white-space: nowrap;
  padding: 10rpx 0;
}

.quick-option-btn {
  background: linear-gradient(135deg, #F8FAFF, #F0F4FF);
  border: 1px solid rgba(74, 144, 226, 0.2);
  color: #4A90E2;
  font-weight: 500;
  border-radius: 30rpx;
  padding: 16rpx 32rpx;
  transition: all 0.3s ease;
  font-size: 28rpx;
  line-height: 1.5;
  margin: 0;
}

.quick-option-btn:active {
  transform: scale(0.98);
  background: linear-gradient(135deg, #F0F4FF, #E6EEFF);
}

/* 底部功能区样式 */
.footer {
  padding: 20rpx 30rpx 30rpx;
  background-color: transparent;
}

.input-area {
  display: flex;
  align-items: center;
  gap: 24rpx;
  margin-bottom: 24rpx;
}

.text-input {
  flex: 1;
  height: 80rpx;
  background-color: #F5F7FA;
  border-radius: 40rpx;
  padding: 0 30rpx;
  font-size: 28rpx;
  border: 1px solid #E8E8E8;
}

.voice-btn {
  width: 80rpx;
  height: 80rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F5F7FA;
  border-radius: 40rpx;
  border: 1px solid #E8E8E8;
  position: relative;
  transition: all 0.3s ease;
}

.voice-btn.recording {
  background-color: #FFEEEE;
  border-color: #FF4D4F;
  transform: scale(1.1);
  box-shadow: 0 0 10rpx rgba(255, 77, 79, 0.3);
}

.recording-tip {
  position: absolute;
  top: -60rpx;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.7);
  color: #FFFFFF;
  padding: 8rpx 16rpx;
  border-radius: 8rpx;
  font-size: 24rpx;
  white-space: nowrap;
}

.function-area {
  display: flex;
  gap: 24rpx;
  justify-content: space-between;
  align-items: center;
}

.one-key-btn {
  height: 80rpx;
  flex: 1;
  background: #4A90E2;
  border-radius: 40rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  box-shadow: 0 4rpx 16rpx rgba(74, 144, 226, 0.3);
}

.btn-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12rpx;
}

.btn-inner text {
  font-size: 32rpx;
  color: #FFFFFF;
  font-weight: 500;
}

.help-btn {
  height: 80rpx;
  padding: 0 40rpx;
  background-color: #F0F7FF;
  border: none;
  border-radius: 40rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8rpx;
}

.help-btn text {
  font-size: 28rpx;
  color: #4A90E2;
}

/* 帮助弹窗样式 */
.help-dialog {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.help-content {
  width: 85%;
  max-width: 600rpx;
  background-color: #FFFFFF;
  border-radius: 24rpx;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 75vh;
}

.help-header {
  padding: 40rpx 40rpx 20rpx;
  text-align: center;
  border-bottom: 1px solid #EEEEEE;
}

.help-title {
  font-size: 36rpx;
  font-weight: 600;
  color: #333333;
}

.help-body {
  padding: 30rpx 40rpx;
  flex: 1;
  overflow-y: auto;
}

.help-section {
  margin-bottom: 40rpx;
}

.help-section:last-child {
  margin-bottom: 20rpx;
}

.section-title {
  font-size: 32rpx;
  font-weight: 600;
  color: #333333;
  margin-bottom: 20rpx;
  display: block;
}

.section-content {
  font-size: 28rpx;
  color: #666666;
  line-height: 1.8;
  white-space: pre-line;
  display: block;
}

.help-footer {
  padding: 30rpx 40rpx 40rpx;
  border-top: 1px solid #EEEEEE;
}

.confirm-btn {
  height: 88rpx;
  background: linear-gradient(135deg, #4A90E2, #357ABD);
  border-radius: 44rpx;
  color: #FFFFFF;
  font-size: 32rpx;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
}

.confirm-btn:active {
  opacity: 0.9;
  transform: scale(0.98);
} 


/* 底部弹出窗口样式 */
.phone-dialog {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
}

.phone-content {
  width: 100%;
  background-color: #FFFFFF;
  border-radius: 24rpx 24rpx 0 0;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.phone-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30rpx;
  border-bottom: 1px solid #EEEEEE;
}

.phone-title {
  font-size: 32rpx;
  font-weight: 600;
  color: #333333;
}

.close-btn {
  padding: 10rpx;
}

.phone-body {
  padding: 30rpx;
}

.doctor-info {
  display: flex;
  align-items: center;
  gap: 20rpx;
  margin-bottom: 30rpx;
}

.doctor-avatar {
  width: 100rpx;
  height: 100rpx;
  border-radius: 50%;
  background-color: #F0F2F5;
}

.doctor-detail {
  display: flex;
  flex-direction: column;
  gap: 4rpx;
}

.doctor-name {
  font-size: 32rpx;
  font-weight: 500;
  color: #333333;
}

.doctor-title {
  font-size: 24rpx;
  color: #666666;
}

.phone-number {
  background-color: #F8FAFF;
  border-radius: 16rpx;
  padding: 20rpx;
  margin-bottom: 30rpx;
}

.number-label {
  font-size: 24rpx;
  color: #999999;
  margin-bottom: 8rpx;
  display: block;
}

.number-value {
  font-size: 36rpx;
  font-weight: 500;
  color: #333333;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 20rpx;
}

.action-btn {
  height: 88rpx;
  border-radius: 44rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12rpx;
  font-size: 32rpx;
  font-weight: 500;
  border: none;
  transition: all 0.3s ease;
  
  &:active {
    transform: scale(0.98);
  }
}

.call-btn {
  background: linear-gradient(135deg, #4A90E2, #357ABD);
  color: #FFFFFF;
  box-shadow: 0 4rpx 16rpx rgba(74, 144, 226, 0.3);
}

.copy-btn, .contact-btn {
  background-color: #F0F7FF;
  color: #4A90E2;
  border: 1px solid rgba(74, 144, 226, 0.2);
}